<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
  <img id = "myImage" onclick="changeImage()" src="./images/1.png" alt="我是韩信" title="">
  <script>
       

       
        function changeImage(){
             //获取对象
             let myImage  = document.querySelector("#myImage");
             //修改属性
             myImage.src ="./images/22.png";
             myImage.alt="这是一张后裔的图片";
             myImage.title="我的大鸟可以让你晕3秒";

        }


  </script>
</body>
</html>